<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="demo">
			please wait...
		</div>
		<script>
			async function myDisplay() {
				let myPromise = new Promise(function(myResolve, myReject) {
					var req=new XMLHttpRequest();
					req.open("GET","../3.html");
					req.onload=function(){
						if(req.status==200){
							myResolve(req.response);
						}else{
							myReject("url not found");
						}
					}
					req.send();
					// setTimeout(function() {
					// 	myResolve("I love You !!");
					// }, 3000);
				});
				document.getElementById("demo").innerHTML = await myPromise;
			}

			myDisplay();
		</script>
	</body>
</html>
